import { createStore, combineReducers } from "redux"
import countReducer from "./reducers/countReducer"
import movieReducer from "./reducers/movieReducer"

console.log("store执行了")

//使用combineReducers方法合并多个reducers,并整合reducers提供的数据
const allReducers = combineReducers({
  count: countReducer,
  movie: movieReducer,
})

//创建store,并携带对应的reducer
const store = createStore(allReducers)

//把store暴露出去
export default store
